import Loadable from 'react-loadable';
import Loading from './Loading';

const routes = [
    {
        path: '/',
        component: Loadable({
            loader: () => import('../modules/home'),
            loading: Loading
        }),
        exact: true,
        title: '首页',
        icon: 'home',
        hideBreadcrumb: true
    }, {
        title: '个人中心',
        path: '/profile',
        component: Loadable({
            loader: () => import('../modules/profile'),
            loading: Loading
        }),
        hideOnMenu: true
    }, {
        path: '/order',
        title: '订单中心',
        icon: 'contacts',
        children: [
            {
                path: '/containerOrder',
                title: '集装箱管理',
                icon: 'box-plot',
                component: Loadable({
                    loader: () => import('../modules/containerOrder'),
                    loading: Loading
                })
            }, {
                path: '/transportOrder',
                title: '运输业务',
                icon: 'sliders',
                children: [
                    {
                        path: '/zadOrder',
                        title: '国际班列',
                        icon: 'global',
                        component: Loadable({
                            loader: () => import('../modules/zadOrder'),
                            loading: Loading
                        })
                    }, {
                        path: '/ghOrder',
                        title: '综合物流',
                        icon: 'hourglass',
                        component: Loadable({
                            loader: () => import('../modules/ghOrder'),
                            loading: Loading
                        })
                    }
                ]
            }, {
                path: '/consolidate',
                title: '拼箱订单',
                icon: 'unordered-list',
                component: Loadable({
                    loader: () => import('../modules/consolidate'),
                    loading: Loading
                })
            }
        ]
    }, {
        path: '/client',
        title: '客户管理',
        icon: 'team',
        component: Loadable({
            loader: () => import('../modules/client'),
            loading: Loading
        })
    }, {
        path: '/carrier',
        title: '供应商管理',
        icon: 'solution',
        component: Loadable({
            loader: () => import('../modules/carrier'),
            loading: Loading
        })
    }, {
        path: '/bill',
        title: '账务管理',
        icon: 'dollar',
        children: [
            {
                path: '/zadOrderBill',
                title: '国际班列账单',
                icon: 'contacts',
                children: [
                    {
                        path: '/zadOrderReceivable',
                        title: '国际班列应收',
                        icon: 'contacts',
                        component: Loadable({
                            loader: () => import('../modules/zadOrderReceivable'),
                            loading: Loading
                        })
                    }, {
                        path: '/zadOrderPayable',
                        title: '国际班列应付',
                        icon: 'contacts',
                        component: Loadable({
                            loader: () => import('../modules/zadOrderPayable'),
                            loading: Loading
                        })
                    }
                ]
            }, {
                path: '/ghOrderBill',
                title: '综合物流账单',
                icon: 'contacts',
                children: [
                    {
                        path: '/ghOrderReceivable',
                        title: '综合物流应收',
                        icon: 'contacts',
                        component: Loadable({
                            loader: () => import('../modules/ghOrderReceivable'),
                            loading: Loading
                        })
                    }, {
                        path: '/ghOrderPayable',
                        title: '综合物流应付',
                        icon: 'contacts',
                        component: Loadable({
                            loader: () => import('../modules/ghOrderPayable'),
                            loading: Loading
                        })
                    }
                ]
            }
        ]
    }, {
        path: '/orderAnalysis',
        title: '统计分析',
        icon: 'transaction',
        children: [
            /*{
                path: '/zadOrderAnalysis',
                title: '统计分析-国际班列',
                icon: 'contacts',
                component: Loadable({
                    loader: () => import('../modules/zadOrderAnalysis'),
                    loading: Loading
                })
            },
            {
                path: '/ghOrderAnalysis',
                title: '统计分析-综合物流',
                icon: 'contacts',
                component: Loadable({
                    loader: () => import('../modules/ghOrderAnalysis'),
                    loading: Loading
                })
            },*/
            /*{
                path: '/orderProfit',
                title: '账务报表-应付应付-利润分析',
                icon: 'pay-circle',
                component: Loadable({
                    loader: () => import('../modules/orderProfit'),
                    loading: Loading
                })
            },
            {
                path: '/cargoAnalysis',
                title: '货物品类管理',
                icon: 'appstore',
                component: Loadable({
                    loader: () => import('../modules/cargoAnalysis'),
                    loading: Loading
                })
            },*/
            {
                path: '/orderProfit',
                title: '项目数据汇总表',
                icon: 'pay-circle',
                component: Loadable({
                    loader: () => import('../modules/orderProfit'),
                    loading: Loading
                })
            },{
                path: '/zadOrderAnal',
                title: '班列业务分析',
                icon: 'appstore',
                component: Loadable({
                    loader: () => import('../modules/zadOrderAnal'),
                    loading: Loading
                })
            }, {
                path: '/orderCountLine',
                title: '业务量分析图',
                icon: 'appstore',
                component: Loadable({
                    loader: () => import('../modules/orderCountLine'),
                    loading: Loading
                })
            }, {
                path: '/profitAnal',
                title: '数量盈利分析表',
                icon: 'appstore',
                component: Loadable({
                    loader: () => import('../modules/profitAnal'),
                    loading: Loading
                })
            }, {
                path: '/linePriceAnalysis',
                title: '价格分析表',
                icon: 'appstore',
                component: Loadable({
                    loader: () => import('../modules/linePriceAnalysis'),
                    loading: Loading
                })
            },
            /*{
                path: '/businessAnalysis',
                title: '业务类型单量',
                icon: 'dribbble',
                component: Loadable({
                    loader: () => import('../modules/businessAnalysis'),
                    loading: Loading
                })
            },
            {
                path: '/priceAnalysis',
                title: '价格分析',
                icon: 'line-chart',
                component: Loadable({
                    loader: () => import('../modules/priceAnalysis'),
                    loading: Loading
                })
            }, */
            {
                path: '/userOperation',
                title: '操作情况',
                icon: 'github',
                component: Loadable({
                    loader: () => import('../modules/userOperation'),
                    loading: Loading
                })
            }
        ]
    }, {
        path: '/base',
        title: '基础信息维护',
        icon: 'setting',
        children: [
            {
                path: '/rate',
                title: '公共汇率管理',
                icon: 'pay-circle',
                component: Loadable({
                    loader: () => import('../modules/rate'),
                    loading: Loading
                })
            }, {
                path: '/businessCode',
                title: '业务类型管理',
                icon: 'tags',
                component: Loadable({
                    loader: () => import('../modules/businessCode'),
                    loading: Loading
                })
            }, {
                path: '/feeItem',
                title: '费用科目管理',
                icon: 'pound',
                component: Loadable({
                    loader: () => import('../modules/feeItem'),
                    loading: Loading
                })
            }, {
                path: '/vehicle',
                title: '车型管理',
                icon: 'car',
                component: Loadable({
                    loader: () => import('../modules/vehicle'),
                    loading: Loading
                })
            }, {
                path: '/goods',
                title: '货物品类维护',
                icon: 'database',
                component: Loadable({
                    loader: () => import('../modules/goods'),
                    loading: Loading
                })
            }, {
                path: '/bgType',
                title: '报关方式维护',
                icon: 'profile',
                component: Loadable({
                    loader: () => import('../modules/bgType'),
                    loading: Loading
                })
            }, {
                path: '/line',
                title: '线路维护',
                icon: 'gateway',
                component: Loadable({
                    loader: () => import('../modules/line'),
                    loading: Loading
                })
            }, {
                path: '/coach',
                title: '口岸信息维护',
                icon: 'flag',
                component: Loadable({
                    loader: () => import('../modules/coach'),
                    loading: Loading
                })
            }, {
                path: '/bankInfo',
                title: '收款银行信息维护',
                icon: 'bank',
                component: Loadable({
                    loader: () => import('../modules/bankInfo'),
                    loading: Loading
                })
            }
        ]
    }, {
        path: '/org',
        title: '组织架构',
        icon: 'dribbble',
        children: [
            {
                path: '/organization',
                title: '组织机构',
                icon: 'team',
                component: Loadable({
                    loader: () => import('../modules/organization'),
                    loading: Loading
                })
            }, {
                path: '/role',
                title: '角色管理',
                icon: 'trademark',
                component: Loadable({
                    loader: () => import('../modules/role'),
                    loading: Loading
                })
            }
        ]
    }, {
        path: '/system',
        title: '系统管理',
        icon: 'setting',
        children: [
            {
                path: '/log',
                title: '操作日志',
                icon: 'unordered-list',
                component: Loadable({
                    loader: () => import('../modules/log'),
                    loading: Loading
                })
            }
            , {
                path: '/notice',
                title: '发布系统公告',
                icon: 'notification',
                component: Loadable({
                    loader: () => import('../modules/notice'),
                    loading: Loading
                })
            }
            , {
                path: '/historyNotice',
                title: '系统历史公告',
                icon: 'notification',
                component: Loadable({
                    loader: () => import('../modules/historyNotice'),
                    loading: Loading
                })
            }
        ]
    }, {
        path: '/historyData',
        title: '历史数据',
        icon: 'history',
        children: [
            {
                path: '/hisZadOrder',
                title: '国际班列',
                icon: 'contacts',
                children: [
                    {
                        path: '/hisZadOrderReceivable',
                        title: '应收',
                        icon: 'unordered-list',
                        component: Loadable({
                            loader: () => import('../modules/hisZadOrderReceivable'),
                            loading: Loading
                        })
                    }, {
                        path: '/hisZadOrderPayable',
                        title: '应付',
                        icon: 'unordered-list',
                        component: Loadable({
                            loader: () => import('../modules/hisZadOrderPayable'),
                            loading: Loading
                        })
                    }
                ]
            }, {
                path: '/hisGhOrder',
                title: '综合物流',
                icon: 'contacts',
                children: [
                    {
                        path: '/hisGhOrderReceivable',
                        title: '应收',
                        icon: 'unordered-list',
                        component: Loadable({
                            loader: () => import('../modules/hisGhOrderReceivable'),
                            loading: Loading
                        })
                    }, {
                        path: '/hisGhOrderPayable',
                        title: '应付',
                        icon: 'unordered-list',
                        component: Loadable({
                            loader: () => import('../modules/hisGhOrderPayable'),
                            loading: Loading
                        })
                    }
                ]
            }
        ]
    }
];

export default routes;
